import {BGMapWrapper} from 'gisplay-es6-webpack/src/Gisplay/Maps/Background Maps/BGMapWrapper.js'BGMapWrapper
Direct Subclass:
This class represents a background map wrapper. Used to be a "middle-man" between the background map provider and the Gisplay API.
Constructor Summary
| Public Constructor | ||
| public | 
       constructor(bgmap: Object) Creates an instance of BGMapWrapper.  | 
    |
Member Summary
| Public Members | ||
| public | 
      
       This is the background map object that comes from the background map provider(e.g., MapBox).  | 
    |
| public | 
       loaderDiv: HTMLDivElement The div that contains the loader.  | 
    |
Method Summary
| Public Methods | ||
| public | 
       addClickEvent(map: Map) Add click event.  | 
    |
| public | 
       addEventListener(eventstr: string, eventfunction: Function): void Adds a listener to a specified event type.  | 
    |
| public | 
       addPanEvent(fun: Function) Add Pan/Drag event.  | 
    |
| public | 
       addZoomEvent(fun: Function) Add zoom event.  | 
    |
| public | 
       createCanvas(id: number): HTMLElement Given one id it creates a canvas object.  | 
    |
| public | 
       createLoader(): void Auxiliar method to be called when there is no loader and we want to create one.  | 
    |
| public | 
      
       Returns the background map object.  | 
    |
| public | 
      
       Returns the latitude of the bounding box northwest corner.  | 
    |
| public | 
      
       Returns the longitude of the bounding box northwest corner.  | 
    |
| public | 
       getContainer(): HTMLElement Returns the map's containing HTML element.  | 
    |
| public | 
      
       Returns the height of the canvas element.  | 
    |
| public | 
      
       Returns the width of the canvas elment.  | 
    |
| public | 
      
       Returns the map's current zoom level.  | 
    |
| public | 
       showLoader(): void Shows loader at the beginning when the API is loading the data.  | 
    |
Public Constructors
Public Members
Public Methods
public addClickEvent(map: Map) source
Add click event.
Params:
| Name | Type | Attribute | Description | 
| map | Map | The function to be called when the user clicks on the map.  | 
    
public addEventListener(eventstr: string, eventfunction: Function): void source
Adds a listener to a specified event type.
Return:
| void | 
public addPanEvent(fun: Function) source
Add Pan/Drag event.
Params:
| Name | Type | Attribute | Description | 
| fun | Function | The function to be called when the user performs drag on the map.  | 
    
public addZoomEvent(fun: Function) source
Add zoom event.
Params:
| Name | Type | Attribute | Description | 
| fun | Function | The function to be called when the user performs zoom in/out on the map.  | 
    
public createCanvas(id: number): HTMLElement source
Given one id it creates a canvas object.
Params:
| Name | Type | Attribute | Description | 
| id | number | The id of the canvas to be created.  | 
    
Return:
| HTMLElement | Canvas object where everything will be drawn.  | 
        
TODO:
- Understand case mapbox comment bellow.
 
public createLoader(): void source
Auxiliar method to be called when there is no loader and we want to create one.
Return:
| void | 
public getBackgroundMapProviderObject(): bgMapObject source
Returns the background map object. This is the Background provider object (e.g., Mapbox, GMaps, HereMaps, Bing Maps).
public getContainer(): HTMLElement source
Returns the map's containing HTML element.
Return:
| HTMLElement | The map's HTML element container.  | 
        
public showLoader(): void source
Shows loader at the beginning when the API is loading the data.
Return:
| void |